<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>test</title>
    <link rel="stylesheet" href="element.css">
</head>

<body>
<div id="tests">
    <div class="block">
        <span class="demonstration">默认 click 触发子菜单</span>
        <el-cascader
                :options="options"
                v-model="selectedOptions"
                @change="handleChange">
        </el-cascader>
    </div>
    <div class="block">
        <span class="demonstration">hover 触发子菜单</span>
        <el-cascader
                expand-trigger="hover"
                :options="options"
                v-model="selectedOptions2"
                @change="handleChange">
        </el-cascader>
    </div>
</div>
<style>
    .el-carousel__item h3 {
        color: #475669;
        font-size: 14px;
        opacity: 0.75;
        line-height: 150px;
        margin: 0;
    }

    .el-carousel__item:nth-child(2n) {
        background-color: #99a9bf;
    }

    .el-carousel__item:nth-child(2n+1) {
        background-color: #d3dce6;
    }
</style>
</body>
<!-- import Vue before Element -->
<script src="./vue.js"></script>
<script src="./jquery.min.js"></script>
<script src="./element.js"></script>
<script>
    new Vue({
        el:"#tests",
        data() {
            return {
                options: [{
                    value: 'zhinan',
                    label: '指南',
                    children: [{
                        value: 'shejiyuanze',
                        label: '设计原则',
                        children: [{
                            value: 'yizhi',
                            label: '一致'
                        }, {
                            value: 'fankui',
                            label: '反馈'
                        }, {
                            value: 'xiaolv',
                            label: '效率'
                        }, {
                            value: 'kekong',
                            label: '可控'
                        }]
                    }],
                selectedOptions: [],
                selectedOptions2: []
            };
            methods: {
                handleChange(value) {
                    console.log(value);
                }
            }
        };
        },

</script>
</html>